#! /bin/bash

java -jar Grades.jar -20 20
java -jar Grades.jar 40 45
java -jar Grades.jar 60 70
java -jar Grades.jar 90 140


myTest=`java -jar Grades.jar -20 20`

if [ "$myTest" = "Component Fail" ]
  then
  echo "Test Failed"
else
  echo "Test Passed"
fi

myTest=`java -jar Grades.jar 40 45`
if [ "$myTest" = "Fail" ]
  then
  echo "Test Passed"
else
  echo "Test Failed"
fi

myTest=`java -jar Grades.jar -60 70`

if [ "$myTest" = "Pass" ]
  then
  echo "Test Passed"
else
  echo "Test Failed"
fi

myTest=`java -jar Grades.jar 100 140`

if [ "$myTest" = "Pass with distinction" ]
  then
  echo "Test Failed"
else
  echo "Test Passed"
fi

